function reflect<T>(param: T) {
  return param
}

let arr = new Array<number>()
const fn: <P>(params: P) => P = reflect

type ReflectFn<P> = (params: P) => P
interface IGenericReflectFunction<P> {
  (param: P): P;
}

const refStr = reflect<string>("aa");
console.log(refStr)

type StringOrNumber<E> = E extends string | number ? E[] : E
type BooleanOrString = string | boolean
type question = StringOrNumber<BooleanOrString> // boolean | string[]